/**
 * 部门
 */
import { $axios } from "../request.js";
import prefix from "../base.js";

export default{
//根据身份证号获取信息判断是否crm员工
  getSdk(url) {
    return $axios(`/xsdcrm-wechat-api/system/wechatLogin/getSdk?url=${url}`);
  },
  //根据身份证号获取信息判断是否crm员工
  getRidInfoByIdCard(idCardNo) {
    return $axios(`${prefix.dormitory}/lodging/getRidInfoByIdCard?idCardNo=${idCardNo}`);
  },
  //根据id获取床位状态
  getBedStatusById(bedId) {
    return $axios(`${prefix.dormitory}/lodging/getBedStatusById?bedId=${bedId}`);
  },
  //根据id获取床位信息
  getBedInfoById(bedId) {
    return $axios(`${prefix.dormitory}/lodging/getBedInfoById?bedId=${bedId}`);
  },
  //功能描述 入住坐标验证
  calculateDistance(data) {
    return $axios(`${prefix.dormitory}/distance/calculateDistance`, data, "POST");
  },
  //生成入驻协议
  regenerate(data) {
    return $axios(`${prefix.dormitory}/lodging/regenerate`, data, "POST");
  },
  //签订入住协议
  signAgreement(data) {
    return $axios(`${prefix.dormitory}/lodging/signAgreement`, data, "POST");
  },
  //加载签名pdf
  loadSignPDF(data){
    return $axios(`${prefix.dormitory}/lodging/loadSignPDF?id=${data}`, data);
  },
  //根据openId和床位号，获取当前用户已入住信息
  getLodgingByOpenIdAndBedId(openid,bedId,type){
    return $axios(`${prefix.dormitory}/lodging/getLodgingByOpenIdAndBedId?openid=${openid}&bedId=${bedId}&type=${type}`);
  },
  // 根据openid获取住宿列表
  getLodgingListByOpenId(openid){
    return $axios(`${prefix.dormitory}/lodging/getLodgingListByOpenId?openid=${openid}`);
  },
  // 根据id获取住宿信息
  getLodgingInfoById(id){
    return $axios(`${prefix.dormitory}/lodging/getLodgingInfoById?id=${id}`);
  },
  // 根据 根据账单id获取详细信息
  getBillInfoById(billId){
    return $axios(`${prefix.dormitory}/lodging/getBillInfoById?billId=${billId}`);
  },
  // 根据openid查询当月获取住宿列表
  getLodgingListByOpenIdAndMonth(openid){
    return $axios(`${prefix.dormitory}/lodging/getLodgingListByOpenIdAndMonth?openid=${openid}`);
  },
  // 根据openid 获取宿管员管理的宿舍账单
  getBillInfoBySupervisorId(openid,confirmStatus,billType){
    return $axios(`${prefix.dormitory}/lodging/getBillInfoBySupervisorId?openId=${openid}&confirmStatus=${confirmStatus}&billType=${billType}`);
  },
// 根据openid获取用户-宿管
  getSysUserByOpenId(openid){
    return $axios(`${prefix.dormitory}/lodging/getSysUserByOpenId?openId=${openid}`);
  },
  // 根据openid获取用户-骑手根据openid查询wx用户 ，inductionType = 3 代表住宿的
  selectWxUserByOpenId(openid,inductionType){
    return $axios(`${prefix.dormitory}/lodging/selectWxUserByOpenId?openId=${openid}&inductionType=${inductionType}`);
  },
  // 功能描述 新增wx用户
  insertSysWxUser(data){
    return $axios(`${prefix.dormitory}/lodging/insertSysWxUser`, data, "POST");
  },
  // 获取关系码表
  getdictType(dictType){
    return $axios(`/xsdcrm-wechat-api/system/wechatLogin/type/${dictType}`);
  },
  // 功能描述 图片验证码登录方法
  loginImg(dictType){
    return $axios(`/xsdcrm-wechat-api/system/wechatLogin/login`, data, "POST");
  },

  // 功能描述 获取验证
  smsCode(data){
    return $axios(`/xsdcrm-wechat-api/system/wechatLogin/sms/code`, data, "POST");
  },
  // 获取验证码图片
  captchaImage(openid){http://111.33.116.186:8082/xsdcrm-wechat-api/system/wechatLogin/type/rid_emergency_contact
    return $axios(`/xsdcrm-wechat-api/system/wechatLogin/captchaImage`);
  },
  // 功能描述 手机号登录方法
  loginSms(data){
    return $axios(`/xsdcrm-wechat-api/system/wechatLogin/sms/login`, data, "POST");
  },
  // 入住申请
  checkIn(data){
    return $axios(`${prefix.dormitory}/lodging/checkIn`, data, "POST");
  },
  // 账单信息表-修改账单
  updateRidersBillInfoById(data){
    return $axios(`${prefix.dormitory}/lodging/updateRidersBillInfoById`, data, "POST");
  },

  // 退宿申请
  checkOut(data){
    return $axios(`${prefix.dormitory}/lodging/checkOut`, data, "POST");
  },
  // 退宿核算
  selectBillInfoCalculate(data){
    return $axios(`${prefix.dormitory}/lodging/selectBillInfoCalculate`, data, "POST");
  },
// 统一下单
  unifiedOrder(data){
    return $axios(`/xsdcrm-wechat-api/pay/unifiedOrder`, data, "POST");
  },
  // 统一下单
  inquireOrder(data){
    return $axios(`/xsdcrm-wechat-api/pay/notify/order`, data, "POST");
  },
  // 支付回调
  createOrder(data){
    return $axios(`/xsdcrm-wechat-api/pay/createOrderByJs`, data, "POST");
  },
  // 支付回调
  queryOrder(id){
    return $axios(`/xsdcrm-wechat-api/pay/queryOrder?id=${id}`, );
  },
  // 扫码判断是否跳转优盟
  getYmJump(data){
    return $axios(`${prefix.dormitory}/abutment/getYmJump`, data, "POST");
  },
  //新增新增维修管理（报修申请）
  addWeixiu(data){
    return $axios(`${prefix.dormitory}/maintain/add`, data, "POST");
  },
  //新增维修损坏物件照片/视频和维修过程照片
  addPicture(data){
    return $axios(`${prefix.dormitory}/maintain/addPicture`, data, "POST");
  },
  // 查询维修管理列表
  picturelist(openid,maintainStatus){
    return $axios(`${prefix.dormitory}/maintain/list?openId=${openid}&maintainStatus=${maintainStatus}`);
  },
  // 获取维修审核详细信息
  maintainDetail(id){
    return $axios(`${prefix.dormitory}/maintain/picture/${id}`);
  },
  // 根据openid获取住宿信息
  getLodgingInfo(openid){
    return $axios(`${prefix.dormitory}/maintain/getLodgingInfo?openId=${openid}`);
  },
  //修改维修管理(维修审核)
  maintainEdit(data){
    return $axios(`${prefix.dormitory}/maintain/edit`, data, "PUT");
  },
// 获取卫生安全管理和宿舍管理信息(扫码后回显数据)
  getShowDormitory(dormitoryId){
    return $axios(`${prefix.dormitory}/health/getShowDormitory?dormitoryId=${dormitoryId}`);
  },
  // 新增卫生安全管理
  addHealth(data){
    return $axios(`${prefix.dormitory}/health`, data, "POST");
  },
  //新增卫生安全管理照片
  addPictureHealth(data){
    return $axios(`${prefix.dormitory}/health/addPicture`, data, "POST");
  },
  //绑定保洁
  bindCleaning(data){
    return $axios(`${prefix.dormitory}/health/bindCleaning`, data, "POST");
  },
  //新增卫生打扫情况
  addCleaning(data){
    return $axios(`${prefix.dormitory}/cleaning`, data, "POST");
  },
  //新增附件
  addMatia(data){
    return $axios(`${prefix.dormitory}/cleaning/addMatia`, data, "POST");
  },
  // 查询商城装备列表
  equipmentList(data){
    return $axios(`${prefix.dormitory}/equipment/listAll`,data,'GET',true);
  },
  // 获取商城装备详细信息
  equipmentInfo(data){
    return $axios(`${prefix.dormitory}/equipment/equipmentInfo`,data,'GET',true);
  },
//新增购物车（单个）
  addCart(data){
    return $axios(`${prefix.dormitory}/cart`, data, "POST");
  },
  //新增购物车（List）
  addCartList(data){
    return $axios(`${prefix.dormitory}/cart/insertList`, data, "POST");
  },
  // 查询购物车列表
  cartList(data){
    return $axios(`${prefix.dormitory}/cart/listAll`,data,'GET',true);
  },
  // 删除购物车
  deleteCart(ids){
    return $axios(`${prefix.dormitory}/cart/${ids}`,'','DELETE',true);
  },
  //新增收藏（单个）
  addCollect(data){
    return $axios(`${prefix.dormitory}/collect`, data, "POST");
  },
  // 查询收藏列表
  collectList(ids){
    return $axios(`${prefix.dormitory}/collect/list`,'','GET',true);
  },
  //删除收藏 ids
  deleteCollect(ids){
    return $axios(`${prefix.dormitory}/collect/${ids}`,'','DELETE',true);
  },
  // 获取城市
  listCity(){
    return $axios(`${prefix.dormitory}/price/listCity`,'','GET',true);
  },
  // 微信骑手留存线上化数据获取
  storeRiderId(riderId){
    return $axios(`${prefix.dormitory}/store/${riderId}`,'','GET',true);
  },
  //新增申请装备
  addApply(data){
    return $axios(`${prefix.dormitory}/apply`, data, "POST");
  },
  //生成装备协议
  applyRegenerate(data) {
    return $axios(`${prefix.dormitory}/apply/regenerate`, data, "POST");
  },
  //查询申请装备列表
  applyList(data) {
    return $axios(`${prefix.dormitory}/apply/list`, data, "GET",true);
  },
  //生成装备协议
  viewLogRiderId(data) {
    return $axios(`${prefix.dormitory}/store/viewLog`, data, "POST");
  },
  //获取专员名片
  getzhanzhangmingpian(data) {
    return $axios(`${prefix.dormitory}/abutment/getzhanzhangmingpian`, data, "POST");
  },
  //维护宿舍坐标
  updateDormitory(data) {
    return $axios(`${prefix.dormitory}/abutment/updateDormitory`, data, "POST");
  },
  //查询咨询骑手信息
  getRidersPhoneInfo(data) {
    return $axios(`${prefix.dormitory}/learningseek/getRidersPhoneInfo`, data, "GET",true);
  },
  //新增咨询中心
  learningseek(data) {
    return $axios(`${prefix.dormitory}/learningseek`, data, "POST");
  },
  //查询课程信息
  learningrecordList(data) {
    return $axios(`${prefix.dormitory}/learningrecord/list`, data, "GET",true);
  },
//新增骑手课程记录
  learningrecord(data) {
    return $axios(`${prefix.dormitory}/learningrecord`, data, "POST");
  },
  //骑手课程记录时间
  updateLearningrecord(data) {
    return $axios(`${prefix.dormitory}/learningrecord/updateLearningrecord`, data, "POST");
  },
  //查询是否要添加
  selectIsInsert(data) {
    return $axios(`${prefix.dormitory}/ridersCleaningApply/selectIsInsert`, data, "GET",true);
  },
  //新增卫生打扫申请
  ridersCleaningApply(data) {
    return $axios(`${prefix.dormitory}/ridersCleaningApply`, data, "POST");
  },
   //新增匿名举报
   ridersCleaningReport(data) {
    return $axios(`${prefix.dormitory}/ridersCleaningReport`, data, "POST");
  }
};
